package com.yilin.platform.entity.weChat;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yilin.platform.base_core.application.CapitalBaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "we_chat_trade_record")
@TableName(value = "we_chat_trade_record")
public class WeChatTradeRecord extends CapitalBaseEntity {
    public enum WeChatTradeType {
        payment(0, "付款"),
        refund(1, "退款");
        @EnumValue
        public Integer index;
        public String name;

        WeChatTradeType(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }
    public enum UserType {
        shipperUser(0, "货主用户"),
        truckerUser(1, "车主用户");
        @EnumValue
        public Integer index;
        public String name;

        UserType(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }
    public enum WeChatType {
        app(0, "APP支付"),
        web(1, "网页支付");
        @EnumValue
        public Integer index;
        public String name;

        WeChatType(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }
    public enum  WeChatTradeStatus {
        create(0, "创建"),
        success(1, "交易成功"),
        fail(2, "交易失败"),
        handle(3, "处理中"),
        close(4, "交易关闭"),
        notpay(5, "未支付");
        @EnumValue
        public Integer index;
        public String name;

        WeChatTradeStatus(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }
    @Column(name = "we_chat_trade_type")
    private WeChatTradeRecord.WeChatTradeType weChatTradeType ;//交易类型
    @Column(name = "we_chat_trade_status")
    private WeChatTradeRecord.WeChatTradeStatus weChatTradeStatus;//交易状态
    @Column(name = "trade_name")
    private String tradeName;//交易名称
    @Column(name = "user_type")
    private WeChatTradeRecord.UserType userType;//用户类型
    @Column(name = "we_chat_type")
    private WeChatTradeRecord.WeChatType weChatType;//付款方式

    @Column(name = "refund_original_trade_no")
    private String refundOriginalTradeNo;//退款原交易订单号
    @Column(name = "remark")
    private String remark;//备注

    public WeChatTradeType getWeChatTradeType() {
        return weChatTradeType;
    }

    public void setWeChatTradeType(WeChatTradeType weChatTradeType) {
        this.weChatTradeType = weChatTradeType;
    }

    public WeChatTradeStatus getWeChatTradeStatus() {
        return weChatTradeStatus;
    }

    public void setWeChatTradeStatus(WeChatTradeStatus weChatTradeStatus) {
        this.weChatTradeStatus = weChatTradeStatus;
    }

    public String getTradeName() {
        return tradeName;
    }

    public void setTradeName(String tradeName) {
        this.tradeName = tradeName;
    }

    public UserType getUserType() {
        return userType;
    }

    public void setUserType(UserType userType) {
        this.userType = userType;
    }

    public WeChatType getWeChatType() {
        return weChatType;
    }

    public void setWeChatType(WeChatType weChatType) {
        this.weChatType = weChatType;
    }

    public String getRefundOriginalTradeNo() {
        return refundOriginalTradeNo;
    }

    public void setRefundOriginalTradeNo(String refundOriginalTradeNo) {
        this.refundOriginalTradeNo = refundOriginalTradeNo;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}
